import api from '@/http/index'

class Api {
    /* 获取表格列表 */
    static getTablesList(data) {
        return new Promise((resolve, reject) => {
            api.post('/api/ComFlowProcess/GetListJson', data).then((res) => {
                resolve(res);
            }).catch(err => {
                reject(err)
            })
        });
    }

    /* 获取角色列表 */
    static getRoleList(data) {
        return new Promise((resolve, reject) => {
            api.post('/api/User/GetUList', data).then((res) => {
                resolve(res);
            }).catch(err => {
                reject(err)
            })
        });
    }
    /* 获取项目列表 */
    static getItemValue(data) {
        return new Promise((resolve, reject) => {
            api.post('/api/ComFlowGroup/GetListJson', data).then((res) => {
                resolve(res);
            }).catch(err => {
                reject(err)
            })
        });
    }
    /*查看公司下审核节点列表*/
    static getComFlowProcessList(data) {
        return new Promise((resolve, reject) => {
            api.post('/api/ComFlowProcess/GetListJson', data).then((res) => {
                resolve(res);
            }).catch(err => {
                reject(err)
            })
        })
    }
    /* 提交表单数据，进行参数修改*/
    static postSubmitForm = (data) => {
        return new Promise((resolve, reject) => {
            api.post('/api/ComFlowProcess/UpdateFrom', data).then((res) => {
                resolve(res);
            }).catch(err => {
                reject(err)
            })
        });
    };
    /* 根据id获取详细信息*/
    static getItemInfo = (data) => {
        return new Promise((resolve, reject) => {
            api.post('/api/ComFlowProcess/GetGirdJson', data).then((res) => {
                resolve(res);
            }).catch(err => {
                reject(err)
            })
        });
    };

}

export default Api

